Copyright: ® 1994 McAfee, Inc.


Using the Dialog Editor

Getting Started

Starting the Dialog Editor

Creating or Modifying a Dialog Box Template

Working with Files

Opening an Existing File

Saving a New Dialog Box Template

Saving an Existing File

Saving an Existing File Under a New Name

Exiting the Dialog Editor

Running the Dialog Editor Standalone

Building Dialog Box Templates

Adding Dialog Box Controls

Defining Dialog Box Controls

Using Text$, Array$, and .Field Items

Cutting, Copying, and Pasting Controls

Capturing Dialog Boxes

Testing the Dialog Box

Using the Toolbar and Status Bar

Using the Toolbar

Using the Status Bar

Getting Help

Getting Help

Keys

Shortcut Keys

Commands

Dialog Editor Commands


Starting the Dialog Editor

To start the Dialog Editor to create a new dialog box template:

1	Position the insertion point where you want to include the new dialog box template.

2	Choose Dialog Editor from the Tools menu.

The Dialog Editor window containing a blank dialog box template is displayed.

To start the Dialog Editor to modify an existing dialog box template:

1	In the script, select the block of text containing the dialog box template. The block of text begins with a Begin Dialog statement and ends with an End Dialog statement. Be sure to include the Begin Dialog and End Dialog statements in the block of selected text.

2	Choose Dialog Editor from the Tools menu.

The text template is translated into a graphical representation in the Dialog Editor window.


Creating or Modifying a Dialog Box Template

The general process of creating or modifying a dialog box is:

Start the Dialog Editor as described under Starting the Dialog Editor.  If you are creating a new dialog box template, an empty dialog box template is displayed.

If you are modifying an existing dialog box template, the dialog box template contains the currently defined controls.

Size the dialog box template by dragging the edges and corners.

Add dialog box controls (buttons, options, boxes, text, etc.) to the dialog box template as described under Adding Dialog Box Controls.

Define the dialog box controls as described under Defining Dialog Box Controls.

Test the dialog box template as described under Testing the Dialog Box Template.

When you are satisfied with the dialog box template, choose Exit & Update from the File menu. The DCL statements defining the dialog box template are inserted in your script.


Opening an Existing File

You can save dialog box templates in text files.  When you open the text file, the Dialog Editor translates the DCL commands into a graphical representation of the dialog box template.

To open an existing file:

1.	Choose the Open command from the File menu.

The Open Dialog File dialog box is displayed.

2.	Select the Drive and Directory containing the file.

3.	Enter the File Name. Or select the file from the File Name list box.

You can change the types of files displayed in the File Name list box by selecting another file type from the List Files of Type box.

4.	Choose OK.


Saving a New Dialog Box Template

You can save the dialog box template to a text file.  The Dialog Editor translates the graphical representation of the dialog box template into DCL commands.  To save a new dialog box template:

1.	Choose the Save As command from the File menu.

The Save Dialog File dialog box is displayed.

2.	If you need to change the current path, select the Drive and Directory to contain the file.

3.	Enter the File Name.

4.	Choose OK.


Saving an Existing File

To save an existing file, choose the Save command from the File menu.


Saving an Existing File Under a New Name

To save an existing file under a new name:

1.	Choose the Save As command from the File menu.

The Save Dialog File dialog box is displayed.

2.	Select the Drive and Directory to contain the file.

3.	Enter the File Name.

4.	From the Save File As Type box, select the desired file type.

5.	Choose OK.

If a file having the same name already exists, you will be asked to confirm that you want to overwrite the file.


Testing the Dialog Box
Testing the Dialog Box Template

To test the dialog box template, choose Test Dialog from the File menu.  Press F2 to return to the Dialog Editor.


Exiting the Dialog Editor

When you have finished creating or modifying the dialog box template, choose Exit & Update from the File menu. If you created a new dialog template, the dialog template commands will be added to your script. If you modified an existing dialog template from your script, the old template is replaced with the new one.

If you do not want to update your script, choose Exit from the File menu. You will be asked whether to update your script before the connection to the Dialog Editor is terminated. Answer No.


Running the Dialog Editor Standalone

You can also run the Dialog Editor as a standalone application, not as a part of the DCL Editor. When you run the Dialog Editor in this way, you must save your dialog box template as an .ADG file.

To start the Dialog Editor standalone, use the File/Run command in Applications Manager (or Program Manager) to start the program ADSDLG11.EXE in the NETTOOLS directory. Alternatively you can use File Manager to start the program.


Adding Dialog Box Controls

You can add the following dialog box controls:  OK button, Cancel button, Push button, Option (radio) button, Check box, Group box, Text, Text box, List box, Combo box.

A mouse is required for this operation.

To add a dialog box control:

1	Select the control from the Item menu or Toolbar.  This causes the cursor to take a shape resembling the control.

2	Move the cursor to the desired location in the dialog box template and click the left mouse button.

3	Size the control (by dragging edges and corners).

For all controls except the OK and Cancel buttons, you need to define the control as described under Defining Dialog Box Controls.

Related Topics:

Defining Dialog Box Controls

A Comprehensive Dialog Example


Defining Dialog Box Controls

After adding a dialog box control, you need to provide specific information to define the control.  For example after adding a Push button, you need to define the label to appear on the button.

To define a dialog box control:

1	Select the control by clicking on it, using the left mouse button.  A border appears around the selected control.  To select the entire dialog box, click the title bar.

2	Choose Info from the Edit menu or Toolbar.

OR

Click on the control again, this time using the right mouse button.

OR

Combine Steps 1 and 2 by double-clicking on the control.

The <Dialog Box Control> Information dialog box is displayed.  The title and contents of this dialog box vary depending on the control you are defining.  Here is a sample Information dialog box.

3	Use the Position and Size group boxes to change the upper left coordinates and size of the control if desired.  (For an explanation of the unit of measurement used in dialog boxes, see the Begin Dialog...End Dialog command.)

4	Complete the Text$, Array$, and .Field items, depending on the type of control you are defining. For more information see, Using Text$, Array$, and .Field Items.

5	Choose OK.

Related Topics:

Using Text$, Array$, and .Field Items

A Comprehensive Dialog Example


Using Text$, Array$, and .Field Items

This topic summarizes how to use the Text$, Array$, and .Field items in the <Dialog Box Control> Information dialog box to define different dialog box controls. Each of these item is related to a DCL command. For an example of these variables in a DCL script, see A Comprehensive Dialog Example.

Text$ Note:  If the text of a label is to be read from a string variable, check the Variable Name box on. In the Dialog Editor window, the name of the variable is displayed rather than literal text.

The Dialog Box

Use the Text$ field to enter a title for the dialog box.

Provide a Name for DCL to use to reference this dialog box template.

Related Command:

Begin Dialog

OK and Cancel button

No action required.  The Dialog() function returns a value of -1 if the OK button was pressed or 0 for the Cancel button.

Related Commands:

OKButton

CancelButton

Push button

Use the Text$ field to enter the label for the button. The Dialog() function returns a value greater than 0 if a Push button was pressed.  1 is the value of the first Push button in the dialog box template, 2 is the second, etc.

Related Command:

PushButton

Check box

Use the Text$ field to enter the label for the check box.

Provide a .Field variable name for this check box.  It contains a -1 if the box is checked or a 0 if it is blank. This variable name must be unique within the dialog box template.

Related Command:

CheckBox

Option group and buttons

An Option group is a collection of related Option buttons.  For each Option button, use the Text$ field to enter the label for the option.

Use the .Field item to enter the same variable name for each Option button in the group. This integer variable indicates which option in the group is selected.  A value of -1 indicates that no option is selected. 0 indicates that the first option in the dialog box template  is selected, 1 indicates the second, etc.

Related Commands:

OptionGroup

OptionButton

List box

Use the Array$ item to provide the name of an array of strings to be displayed in the list box.

Use the .Field item to provide the name of an integer variable, which serves as the index to the array.  This variable points to the selected array element. The first array element is 0, the second is 1, etc. When the array index is set to -1, no item is selected.

Related Command:

ListBox

Combo box

Use the Array$ item to provide the name of an array of strings to be displayed in the list box.

Use the .Field item to provide the name of a variable that contains the string that occupies the combo box.

Related Command:

ComboBox

Text

Use the Text$ field to enter the text to be displayed.

Related Command:

Text

Text box

Provide a Field variable name for this text box. This string variable will contain the text for the text box.   This variable name must be unique within the dialog box template.

Related Command:

TextBox

Group box

Use the Text$ field to enter the label for the group.

Related Command:

GroupBox


Cutting, Copying, and Pasting Controls

The DCL Dialog Editor lets you perform various graphical "editing" tasks.

Use the Cut command on the Edit menu to remove a control you have selected from the dialog box template and store it in the Windows clipboard.

Use the Copy command to copy the selected control to the clipboard.

Use the Paste command to insert the contents of the clipboard in the dialog box template.

Use the Clear command to remove the selected control from the dialog box template.

Use the Duplicate command to make a copy of the selected control in the dialog box template.

Related Topic:

Shortcut Keys


Capturing Dialog Boxes

You can capture the controls from another dialog box to the Windows clipboard and then paste those controls in the Dialog Editor dialog box template.

To capture the controls from another dialog box:

1	If the dialog box you want to capture is visible with the Dialog Editor window displayed, choose the Capture in Place command from the Capture menu.

If the dialog box is hidden by the Dialog Editor window, choose the Capture from Back command. If you choose this command, the Dialog Editor window is hidden while you capture the dialog box.

The mouse cursor takes the shape of a hook. When the cursor is over a capturable dialog, it looks like this:

2.	Click on the dialog box you want to capture.

The dialog box controls are stored in the Windows clipboard as DCL commands.

Return to the Dialog Editor window.

3.	Click inside the dialog box template in the Dialog Editor window.

4.	Choose the Paste command from the Copy menu.


Using the Toolbar

The Toolbar is a row of buttons representing frequently used Dialog Editor commands.  Instead of using the menus, you can choose a Toolbar button to execute a command.

The Toolbar looks like this.  Click any button you want information about.


Using the Status Bar

The Status Bar appears at the bottom of the Dialog Editor window. The Status Bar looks like this.

It provides the name, coordinates, and size of the selected control.


Getting Help

DCL provides extensive Help that describes how to use the graphical dialog box building environment.

To display the Table of Contents for the Dialog Editor Help, choose Contents from the Help menu or press F1.

To search an index of DCL Help keywords, choose Search for Help On from the Help menu.

For information on Microsoft Windows Help, choose How to Use Help from the Help menu.

Context Sensitive Help

When you request context-sensitive Help, DCL displays a particular Help topic, based on your current activity. For help on a menu item or Toolbar button:

1.	Press Shift + F1.

The cursor changes to indicate that you are requesting context-sensitive Help.

2.	Choose the menu and command, or Toolbar button you want Help on.


Shortcut Keys

You can use the following keys when working with dialog box controls:

Key	Description

Ctrl+C	Copy the current control to the clipboard

Ctrl+V	Paste the contents of the clipboard

Ctrl+X	Cut the current control and store it in the clipboard

Ctrl+D	Duplicate the current control

Del	Clear the current control

Ctrl+I	Display the Information dialog box

F1	Go to the Dialog Editor Help Contents

Shift+F1	Context-sensitive help for menu items and Toolbar buttons

F2	Toggle dialog box test on and off


Cuts the selected dialog box control and stores it in the clipboard.

Related Topic:

Cutting, Copying, and Pasting Controls


Copies the selected dialog box control to the clipboard.

Related Topic:

Cutting, Copying, and Pasting Controls


Pastes the contents of the clipboard in the dialog box template.

Related Topic:

Cutting, Copying, and Pasting Controls


Clears the selected control from the dialog box template.

Related Topic:

Cutting, Copying, and Pasting Controls


Duplicates the selected control in the dialog box template.

Related Topic:

Cutting, Copying, and Pasting Controls


Adds the OK Button to the dialog box template.

Related Topic:

Adding Dialog Box Controls


Adds the Cancel Button to the dialog box template.

Related Topic:

Adding Dialog Box Controls


Adds a Push Button to the dialog box template.

Related Topic:

Adding Dialog Box Controls


Adds an Option Button to the dialog box template.

Related Topic:

Adding Dialog Box Controls


Adds a Check Box to the dialog box template.

Related Topic:

Adding Dialog Box Controls


Adds a Group Box to the dialog box template.

Related Topic:

Adding Dialog Box Controls


Adds Text to the dialog box template.

Related Topic:

Adding Dialog Box Controls


Adds a Text Box to the dialog box template.

Related Topic:

Adding Dialog Box Controls


Adds a List Box to the dialog box template.

Related Topic:

Adding Dialog Box Controls


Adds a Combo Box to the dialog box template.

Related Topic:

Adding Dialog Box Controls


Displays a test dialog box based on the current controls.

Related Topic:

Testing the Dialog Box Template


Lets you define the selected dialog box control.

Related Topic:

Defining Dialog Box Controls


Displays the Table of Contents for the Dialog Editor Help.

Related Topic:

Getting Help


Indicates the position in dialog box units of the top left corner of the control.


Indicates the width and height in dialog box units of the control.


This field varies, depending on the particular dialog box control you are defining.


Dialog Editor Commands

File Menu Commands

New

Open

Save

Save As

Test Dialog

Exit & Update

Exit

Edit Menu Commands

Cut

Copy

Paste

Clear

Duplicate

Info

Item Menu Commands

OK Button

Cancel Button

Push Button

Option Button

Check Box

Group Box

Text

Text Box

List Box

Combo Box

Capture Menu Commands

Capture from Back

Capture in Place

Help Menu Commands

Help Contents

Search for Help On

How to Use Help

About Dialog Editor

Shift + F1 Command

Context Sensitive Help

Keys

Shortcut Keys


New command (Dialog Editor)
New

Use the New command to open a new dialog box template. If another dialog box template is open, it is closed.

Related Topic:

Creating or Modifying a Dialog Box


Open command (Dialog Editor)
Open

Use the Open command to open an existing file containing a dialog box template.

Related Topic:

Opening an Existing File


Save command (Dialog Editor)
Save

Use the Save command to save the dialog box template.

Related Topics:

Saving a New Dialog Box Template

Saving an Existing File


Save As command (Dialog Editor)
Save As

Use the Save As command to save an existing file under a new name.

Related Topic:

Saving an Existing File Under a New Name


Test Dialog command (Dialog Editor)
Test Dialog

Use the Test Dialog command to test the dialog box template.

Related Topic:

Testing the Dialog Box Template


Exit & Update command (Dialog Editor)
Exit & Update

When you have finished creating or modifying the dialog box template, choose Exit & Update from the File menu. If you created a new dialog template, the dialog template commands will be added to your script. If you modified an existing dialog template from your script, the old template is replaced with the new one.

Related Topic:

Exiting the Dialog Editor


Exit command (Dialog Editor)
Exit

If you want to exit the Dialog Editor without updating your script, choose Exit from the File menu. You will be asked whether to update your script before the connection to the Dialog Editor is terminated. Answer No.

Related Topic:

Exiting the Dialog Editor


Cut command (Dialog Editor)
Cut

Use the Cut command to remove a control you have selected from the dialog box template and store it in the Windows clipboard.

Related Topic:

Cutting, Copying, and Pasting Controls


Copy command (Dialog Editor)
Copy

Use the Copy command to copy the selected dialog box control to the Windows clipboard.

Related Topic:

Cutting, Copying, and Pasting Controls


Paste command (Dialog Editor)
Paste

Use the Paste command to insert the contents of the Windows clipboard in the dialog box template.

Related Topic:

Cutting, Copying, and Pasting Controls


Clear command (Dialog Editor)
Clear

Use the Clear command to remove the selected control from the dialog box template.

Related Topic:

Cutting, Copying, and Pasting Controls


Duplicate command (Dialog Editor)
Duplicate

Use the Duplicate command to make a copy of the selected control in the dialog box template.

Related Topic:

Cutting, Copying, and Pasting Controls


Info command (Dialog Editor)
Info

Use the Info command to define the selected dialog box control (or entire dialog box).

Related Topic:

Defining Dialog Box Controls


OK Button command (Dialog Editor)
OK Button

Use this command to add the OK Button to the dialog box template.

Related Topic:

Adding Dialog Box Controls


Cancel Button command (Dialog Editor)
Cancel Button

Use this command to add the Cancel Button to the dialog box template.

Related Topic:

Adding Dialog Box Controls


Push Button command (Dialog Editor)
Push Button

Use this command to add a Push Button to the dialog box template.

Related Topic:

Adding Dialog Box Controls


Option Button command (Dialog Editor)
Option Button

Use this command to add an Option Button to the dialog box template.

Related Topic:

Adding Dialog Box Controls


Check Box command (Dialog Editor)
Check Box

Use this command to add a Check Box to the dialog box template.

Related Topic:

Adding Dialog Box Controls


Group Box command (Dialog Editor)
Group Box

Use this command to add a Group Box to the dialog box template.

Related Topic:

Adding Dialog Box Controls


Text command (Dialog Editor)
Text

Use this command to add Text to the dialog box template.

Related Topic:

Adding Dialog Box Controls


Text Box command (Dialog Editor)
Text Box

Use this command to add a Text Box to the dialog box template.

Related Topic:

Adding Dialog Box Controls


List Box command (Dialog Editor)
List Box

Use this command to add a List Box to the dialog box template.

Related Topic:

Adding Dialog Box Controls


Combo Box command (Dialog Editor)
Combo Box

Use this command to add a Combo Box to the dialog box template.

Related Topic:

Adding Dialog Box Controls


Capture from Back command (Dialog Editor)
Capture from Back

Use the Capture from Back command to capture the controls from a dialog box that is hidden by Dialog Editor window. The Dialog Editor window is hidden while you capture the dialog box.

Related Topic:

Capturing Dialog Boxes


Capture in Place command (Dialog Editor)
Capture in Place

Use the Capture in Place command to capture the controls from a dialog box that is visible with the Dialog Editor window displayed.

Related Topic:

Capturing Dialog Boxes


Help Contents command (Dialog Editor)
Help Contents

Use the Help Contents command to display the Table of Contents for Dialog Editor Help.

Related Topic:

Getting Help


Search for Help On command (Dialog Editor)
Search for Help On

Use the Search for Help On command to search an index of DCL Help keywords.

Related Topic:

Getting Help


How to Use Help command (Dialog Editor)
How to Use Help

Use the How to Use Help command for information on how the use Microsoft Windows Help.

Related Topic:

Getting Help


About Dialog Editor command
About Dialog Editor

Use the About Dialog Editor command to display the version number and memory information.

Related Topic:

Getting Help


Context Sensitive Help (Dialog Editor)
Context Sensitive Help

Press Shift + F1 to display the context-sensitive help cursor then choose a menu command or Toolbar button for help specific to the command or button.

Related Topic:

Getting Help


Choose the Cancel button to discard changes and exit the current dialog box.


The Directories box lists the directory tree for the selected Drive. Scroll through the list and double-click on the desired directory.


The Drives box lists the drives that are available for you to use.


Enter the file name in the File Name box or select the file name from the list of files in the current directory.


Choose the Help button for information about the current dialog box and the procedures it is used in.


Choose the OK button to save your changes and exit the current dialog box.


The Save File As Type box lists the possible file types this file can be saved as.


Use the List Files of Type box to change the type of files displayed in the File Name list box.